﻿@namespace Microsoft.FluentUI.AspNetCore.Components
@inherits FluentComponentBase
@inject IMessageService MessageService

@if (MessageService != null && MessagesToShow.Count() > 0)
{
    <div @attributes="AdditionalAttributes" class="fluent-messagebar-provider @ClassValue" style="@StyleValue">
        @foreach (var message in MessagesToShow)
        {
            <FluentMessageBar Content="@message" Type="@Type" Style="@(Type == MessageType.Notification ? "border-top: 1px solid lightgray;" : "")" AllowDismiss="@message.AllowDismiss" />
        }
    </div>
}
